import request from '@/utils/request'

// 查询课程练习配置列表
export function listcourseQuestionCfg(query) {
  return request({
    url: '/system/courseQuestionCfg/list',
    method: 'get',
    params: query
  })
}

// 查询课程练习配置列表，章节名称去重
export function distinctListcourseQuestionCfg(query) {
  return request({
    url: '/system/courseQuestionCfg/distinctList',
    method: 'get',
    params: query
  })
}



// 查询课程练习配置详细
export function getcourseQuestionCfg(id) {
  return request({
    url: '/system/courseQuestionCfg/' + id,
    method: 'get'
  })
}


// 通过章节查询课程练习配置详细
export function getcourseQuestionCfgByCourseCatalogId(id) {
  return request({
    url: '/system/courseQuestionCfg/courseCatalogId/' + id,
    method: 'get'
  })
}



// 新增课程练习配置
export function addcourseQuestionCfg(data) {
  return request({
    url: '/system/courseQuestionCfg',
    method: 'post',
    data: data
  })
}

// 修改课程练习配置
export function updatecourseQuestionCfg(data) {
  return request({
    url: '/system/courseQuestionCfg',
    method: 'put',
    data: data
  })
}

// 删除课程练习配置
export function delcourseQuestionCfgByCourseCatalogId(id) {
  return request({
    url: '/system/courseQuestionCfg/courseCatalogId/' + id,
    method: 'delete'
  })
}

// 删除课程练习配置
export function delcourseQuestionCfg(id) {
  return request({
    url: '/system/courseQuestionCfg/' + id,
    method: 'delete'
  })
}

// 导出课程练习配置
export function exportcourseQuestionCfg(query) {
  return request({
    url: '/system/courseQuestionCfg/export',
    method: 'get',
    params: query
  })
}

// 获取章节下拉
export function getCourseCat() {
  return request({
    url: '/system/course/courseist',
    method: 'get'
  })
}

// 查询[题库]列表
export function listquestionStore(query) {
  return request({
    url: '/system/questionStore/list',
    method: 'get',
    params: query
  })
}


// 查询[题库]详细
export function getquestionStore(id) {
  return request({
    url: '/system/questionStore/' + id,
    method: 'get'
  })
}